#!/bin/sh
#hbase表通过hive内部表创建，修改VehicleRotationAbnormalStatistic默认表结构，

#hbase命名空间
NAMESPACE=dongfeng
count=`echo "list_namespace_tables '${NAMESPACE}'" | hbase shell | grep -w 'VehicleRotationAbnormalStatistic' | wc -l`
if [ $count -eq 1 ];then
hbase shell <<EOF
alter '${NAMESPACE}:VehicleRotationAbnormalStatistic',{NAME => 'd', COMPRESSION => 'SNAPPY', DATA_BLOCK_ENCODING => 'FAST_DIFF',TTL => '15552000'}, {NUMREGIONS => 10, SPLITALGO => 'HexStringSplit'},{SPLITS => ['1|','2|','3|','4|','5|','6|','7|','8|','9|']},
{METADATA => {'SPLIT_POLICY' => 'org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy', 'MAX_FILESIZE' => '53687091200'}}
EOF
fi
